import React from 'react';
import ReactDOM from 'react-dom/client';
import { ConfigProvider } from "antd-mobile";
import enUS from 'antd-mobile/es/locales/en-US'
import { Provider } from 'react-redux'
import store from './store';
import App from './App';

import 'lib-flexible'
import './index.less'

/* 处理最大宽度 */
(function(){
  const handleMax = ()=>{
      let html = document.documentElement,
        root = document.querySelector('#root'),
        deviceW = html.clientWidth; //设备宽度
      root.style.maxWidth = '750px' //
      if(deviceW >= 750){
          html.style.fontSize = '75px'
      }
  }
  handleMax()
  //window.addEventListener('resize',handleMax)
})()

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
    <>
      <ConfigProvider locale={enUS}>
        <Provider store={store}>
          <App />
        </Provider>
      </ConfigProvider>
    </>
);

